#include "paintsource.h"

PaintSource::PaintSource(QWidget *parent) : QWidget(parent)
{

}

void PaintSource::paintEvent(QPaintEvent *p)
{
    QPainter pa(this);
    QImage resize;
    if(!image.isNull()){
        resize=image.scaled(width(),height(),Qt::KeepAspectRatio);
        pa.drawImage(0,0,resize);
    }
}
